package com.spic.business.plan.supplies.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.spic.business.common.core.domain.BasicEntity;
import com.spic.business.common.core.utils.poi.CanClone;
import com.spic.business.common.utils.UserCodeConverter;
import com.spic.common.core.annotation.Excel;
import lombok.Data;

import java.util.Date;

/**
 * 应急物资台账对象 plan_supplies
 *
 * @author spic
 * @date 2021-10-27
 */
@Data
public class PlanSupplies extends BasicEntity implements CanClone {
    private static final long serialVersionUID = 1L;

    /**
     * 应急物资台账主键id
     */
    private Long id;

    /**
     * 物资名称
     */
    @Excel(name = "物资名称")
    @ExcelProperty(value = "物资名称", converter = UserCodeConverter.class)
    private String materialName;

    /**
     * 物资编码
     */
    @Excel(name = "物资编码", dictType = "sys_user_sex")
    @ExcelProperty("物资编码")
    private String materialCode;

    /**
     * 物资类型
     */
    @Excel(name = "物资类型")
    private String materialType;

    /**
     * 规格型号
     */
    @Excel(name = "规格型号")
    private String specificationModels;

    /**
     * 库存数量
     */
    @Excel(name = "库存数量")
    private Double quantityStock;

    /**
     * 单位
     */
    @Excel(name = "单位")
    private String monad;

    /**
     * 放置位置
     */
    @Excel(name = "放置位置")
    private String settingPosition;

    /**
     * 保质期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保质期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /**
     * 附件
     */
    @Excel(name = "附件")
    private String accessory;

    /**
     * 负责人
     */
    @Excel(name = "负责人")
    private String principalPeople;

    /**
     * 修改人
     */
    @Excel(name = "替代人")
    private String substitutePeople;
    /**
     * 检查标准
     */
    @Excel(name = "检查标准")
    private String inspectionStandard;

    @Excel(name = "状态")
    private String state;

    @Override
    public PlanSupplies clone() {
        PlanSupplies planSupplies = null;
        try {
            planSupplies = (PlanSupplies)super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return planSupplies;
    }
}
